package com.geektime.customer.domain;

import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.sql.Update;

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @Author: liaojh
 * @Date: 2022/10/24
 * @Description:
 */
@Entity
@Getter
@Setter
@Table(name = "customer_2")
@GenericGenerator(name = "jpa-uuid", strategy = "uuid")
public class Customer2 implements Serializable {

    @Id
    @Column(name = "id")
    @NotNull(groups = {Update.class})
    @GeneratedValue(generator = "jpa-uuid")
    private String id;

    @Column(name = "name")
    private String name;


}
